import 'package:architecture/os_size.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../../widgets/text_button.dart';
import '../../anim/lottie/lottie_page.dart';
import '../../hero/hero_page.dart';
import 'anim_controller.dart';

class AnimPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GetBuilder<AnimController>(
        init: AnimController(),
        builder: (controller) {
          return Container(
              margin: EdgeInsets.only(top: 20),
              height: windowHeight,
              child: Wrap(
                  alignment: WrapAlignment.start,
                  crossAxisAlignment: WrapCrossAlignment.start,
                  spacing: 20,
                  runSpacing: 20,
                  children: [
                    MyTextButton(
                      text: "Lottie",
                      confirm: () {
                        Get.to(LottiePage());
                      },
                    ),
                    MyTextButton(
                      text: "Hero动画",
                      confirm: () {
                        Get.to(HeroAnimation());
                      },
                    ),
                  ]));
        });
  }
}
